![]() |
![]() |
![]() |
|
DX11 SET NEW CAMERA RENDER TARGET
Creates a new render target image and sets it as the render target for the specified camera. A render target is an image that everything the camera sees will be drawn to. One of the features of DirectX 11 is that you can have up to 8 render targets that can be drawn to in a single render pass. Perfect for deferred shading. When using multiple render targets your pixel shader will output a struct which contains members using the SV_TARGET (SV_TARGET0 - SV_TARGET7 are valid) semantic. Take note that while the different render targets associated to the same camera can have different formats, they must have the same dimensions. This function will fail if you try to set several render targets having different sizes. Only a single render target per camera can exist in DX10 mode however, which would then be bound to stage 0. The render target image created by this function can be used as a texture for objects / limbs, however it can not be assigned as a texture to any object that is drawn to this camera. You can use the camera mask of the object, manually exclude it, change its texture before rendering the camera writing to its render target texture or some other approach to avoid this. Note that you will have to delete the returned image when you are done with it; for safety reasons it will not be automatically deleted when the camera is / the render target is released. This is to ensure that you will not accidentally end up with an invalid image pointer if you used the render target image as a texture for something else or similar.
Return Dword rtimage = DX11 SET NEW CAMERA RENDER TARGET(camera, width, height, [id], [format])
camera Dword width Dword height Dword [Optional] id Dword [Optional] format Dword
An image that corresponds to the created render target, or 0 if the provided ID is out of range.
CAMERA Functions Menu |
![]() |